import * as React from 'react';
import {View, Text} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import IconFont from './src/iconfont';
import ShoppingCartPage from './src/pages/ShoppingCartPage';

function HomeScreen() {
  return (
    <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
      <ShoppingCartPage name={'123'} />
      <Text>Home Screen1</Text>
      <View>
        <IconFont name="iconicontishi" size={40} color={['green', 'orange']} />
        <IconFont
          name="iconwanchenggongxu"
          size={40}
          color={['green', 'orange']}
        />
      </View>
    </View>
  );
}

const Stack = createStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen
          name="Home"
          component={HomeScreen}
          options={{title: '主页'}}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default App;
